package me.project.android.client.fallback;

import cn.soboys.restapispringbootstarter.Result;
import me.project.android.client.AndroidClient;
import me.project.common.exception.HttpStatus;
import me.project.android_common.domain.AndroidInfo;
import me.project.android_common.domain.DataPoint;
import org.springframework.stereotype.Component;

@Component
public class AndroidClientFallBack implements AndroidClient {

    @Override
    public Result addOrUpdate(DataPoint dataPoint) {
        return Result.buildFailure(HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getCode(),HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getMessage());
    }
    @Override
    public Result addOrUpdate(AndroidInfo androidInfo) {
        return Result.buildFailure(HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getCode(),HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getMessage());
    }
    @Override
    public Result getById(Long id) {
        return Result.buildFailure(HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getCode(),HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getMessage());
    }

    @Override
    public Result getByLoginId(Long loginId) {
        return Result.buildFailure(HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getCode(),HttpStatus.THE_SERVICE_IS_CIRCUIT_BREAKER.getMessage());
    }
}